//
//  UnPassTableViewCell.m
//  SafeFoodManagerDemo
//
//  Created by bob on 2017/11/9.
//  Copyright © 2017年 bob. All rights reserved.
//

#import "UnPassTableViewCell.h"
#import "UILabel+NSAttributeString.h"
@implementation UnPassTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.StatueLabel.layer.borderColor=[UIColor orangeColor].CGColor;
    self.StatueLabel.layer.borderWidth=1.0;
    
    self.StatueLabel.layer.cornerRadius=2.0;
    
    self.StatueLabel.layer.masksToBounds=YES;
    // Initialization code
}

-(void)setData:(UnPassData *)data
{
    _data=data;
    
    self.Contentlabel.text=data.name;
    
    if (data.lev) {
        
        self.StarImageView.hidden=NO;
        
        self.StarViewWidth.constant=20;
        self.StarImageView.image=[UIImage imageNamed:@"start"];
        
    }else{
        
        self.StarImageView.hidden=YES;
        
        self.StarViewWidth.constant=0;
        
    }
    
    switch (data.state) {
        case 0:
        {
           
            self.StatueLabel.text=@"未处理";
            
        }
            break;
            
        case 1:
        {
            self.StatueLabel.text=@"待审核";
        }
            break;
            
        case 2:
        {
             self.StatueLabel.text=@"已通过";
        }
            break;
        case 3:
        {
             self.StatueLabel.text=@"未通过";
        }
            break;
            
        default:
            break;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
